﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductEdit.aspx.cs" Inherits="Admin_Product_ProductEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <script type="text/javascript" src="../../Js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="../../Js/myValidate/myValidate.js"></script>
    <link href="../../Js/artDialog3.0.2/skin/default.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Js/artDialog3.0.2/artDialog.js"></script>
    <script type="text/javascript" src="../../js/My97DatePicker/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        $(function () {
            blur_check("txtTitle", 'v_required');
            blur_check("txtAbout", 'v_required');
            blur_check("txtDetails", 'v_required');
            blur_check("txtStartPrice", 'v_required');
            blur_check("txtStartTime", 'v_required');
            blur_check("txtEndTime", 'v_required');
        });
        function doSubmit() {
            var valid = true;
            valid &= my_check("txtTitle", 'v_required');
            if (valid == false || valid == 0) {
                alert("输入有误,请检查!");
            }
            return valid == 0 ? false : valid;
            /*特别说明：如果需要验证的文本框后带有<span>标签，则默认给提示，不带则不提示*/
        };
        function show() {
            art.dialog.open('../../Js/uploader/default.html', {
                yesFn: function (iframeWin, topWin) {
                    var re = iframeWin.document.getElementById('txtImgUrl').value; //获取iframe数据
                    document.getElementById('hfImg').value = re;
                    $("#MyImg").attr("src", "../../uploads/" + re);
                    return true;
                }
            });
        };
        function show1() {
            art.dialog.open('../../Js/uploader/default.html', {
                yesFn: function (iframeWin, topWin) {
                    var re = iframeWin.document.getElementById('txtImgUrl').value; //获取iframe数据
                    document.getElementById('hfImg1').value = re;
                    $("#MyImg1").attr("src", "../../uploads/" + re);
                    return true;
                }
            });
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
        <tr bgcolor="#FFFFFF">
            <td align="center">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin: 20px 0px 20px 0px;
                    font-size: 14px; line-height: 30px;">
                    <tr>
                        <td width="100px;" align="right" style="padding-right: 10px;">
                            产品标题
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtTitle" runat="server" Width="350px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="100px;" align="right" style="padding-right: 10px;">
                            产品简介
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtAbout" runat="server" Width="350px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="100px;" align="right" style="padding-right: 10px;">
                            封面图片
                        </td>
                        <td align="left">
                            <div style="width: 50%; height: 200px; overflow: scroll; border: 1px solid #ccc">
                                <asp:Image ID="MyImg" runat="server" ImageUrl="../images/hxd_default.jpg" onerror="this.src='../images/hxd_default.jpg'" />
                            </div>
                            <input id="hfImg" type="hidden" runat="server" />
                            <input id="Button2" type="button" value="上传" class="button_style" onclick="show()" />
                        </td>
                    </tr>
                    <tr>
                        <td width="100px;" align="right" style="padding-right: 10px;">
                            产品详情
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtDetails" TextMode="MultiLine" runat="server" Height="100px" Width="350px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="100px;" align="right" style="padding-right: 10px;">
                            详情图片
                        </td>
                        <td align="left">
                            <div style="width: 50%; height: 200px; overflow: scroll; border: 1px solid #ccc">
                                <asp:Image ID="MyImg1" runat="server" ImageUrl="../images/hxd_default.jpg" onerror="this.src='../images/hxd_default.jpg'" />
                            </div>
                            <input id="hfImg1" type="hidden" runat="server" />
                            <input id="Button3" type="button" value="上传" class="button_style" onclick="show1()" />
                        </td>
                    </tr>
                    <tr>
                        <td width="100px;" align="right" style="padding-right: 10px;">
                            起拍价格
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtStartPrice" runat="server" Width="300px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="100px;" align="right" style="padding-right: 10px;">
                            起拍时间
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtStartTime" runat="server" Width="300px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="100px;" align="right" style="padding-right: 10px;">
                            结束时间
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtEndTime" runat="server" Width="300px"></asp:TextBox>
                        </td>
                    </tr>
                                        <tr>
                        <td width="100px;" colspan="2" align="right" style="padding-right: 10px; padding-left: 150px;">
                            <asp:ImageButton ID="btnsave" OnClientClick="return doSubmit()" ImageUrl="../images/btnsave.gif"
                                runat="server" OnClick="btnsave_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
